import request from "./request";

//查询全部轮播图
export function findAllLunbo() {
  return request.get("find_all_lun_bo");
}
//添加轮播图
export function addLunbo(imgTitle,imgUrl){
  return request.post('add_lun_bo',{
    title:imgTitle,
    cover:imgUrl
  });
}
//根据id删除轮播图
export function deleteLunboById(id) {
  return request.delete(`delete_lun_bo?id=${id}`);
}

//根据id更新轮播图
export function updateLunboById(id,imgTitle,imgUrl) {
  return request.post('update_lun_bo',{
    id,
    title:imgTitle,
    cover:imgUrl
  })
}
